﻿<Window 
  x:Class="CrackNET.MainWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:CrackNET"
  AllowsTransparency="True"
  Background="Transparent"
  FontFamily="Consolas"
  Icon="Images/app.png"
  ResizeMode="NoResize"
  Title="Crack.NET" 
  Width="560" Height="115"
  WindowStartupLocation="CenterScreen"
  WindowStyle="None"
  >
  <Window.Resources>
    <ResourceDictionary Source="MainWindowResources.xaml" />
  </Window.Resources>
  
  <Border BorderBrush="Gray" BorderThickness="0.5" CornerRadius="8" Margin="8" SnapsToDevicePixels="True">
    <Border.Background>
      <ImageBrush ImageSource="Images/Circuit.jpg" Stretch="Fill" Opacity="0.4" />
    </Border.Background>
    <Border.Effect>
      <DropShadowEffect Opacity="0.7" RenderingBias="Quality" />
    </Border.Effect>
    <Grid>
      <StackPanel VerticalAlignment="Top" HorizontalAlignment="Stretch" Margin="3,0,3,2">
        <Grid>
          <Grid>
            <Grid.Background>
              <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                <GradientStop Offset="0" Color="#CC999999" />
                <GradientStop Offset="0.25" Color="#BB999999" />
                <GradientStop Offset="1" Color="#CC888888" />
              </LinearGradientBrush>
            </Grid.Background>
            <!-- This TextBlock if offset to provide a simple "shadow" effect. -->
            <TextBlock  
              FontSize="17.5" 
              FontWeight="Bold"
              Foreground="Black" 
              Margin="1.5,2,0,0"
              Padding="37,2,0,2"
              SnapsToDevicePixels="True"
              Text="Crack.NET"
              TextAlignment="Left"
              />
            <TextBlock 
              FontSize="17.5" 
              FontWeight="Bold"
              Foreground="WhiteSmoke" 
              Margin="0,2"
              Padding="37,2,0,2"
              SnapsToDevicePixels="True"
              Text="Crack.NET"
              TextAlignment="Left"
              />

            <!-- This TextBlock if offset to provide a simple "shadow" effect. -->
            <TextBlock 
              FontSize="10.5" 
              FontWeight="SemiBold"
              Foreground="WhiteSmoke" 
              Margin="0,2"
              Padding="130,9.2,0,2"
              SnapsToDevicePixels="True"
              TextAlignment="Left"
              >
              <Hyperlink Focusable="False" NavigateUri="http://cracknetproject.com" RequestNavigate="OnHyperlinkRequestNavigate">
                <TextBlock Text="by Josh Smith" />
              </Hyperlink>
            </TextBlock>

            <!-- This Grid emulates a light reflection on top of the header area. -->
            <Grid Height="8" VerticalAlignment="Top" HorizontalAlignment="Stretch">
              <Grid.Background>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                  <GradientStop Offset="0" Color="#70FFFFFF" />
                  <GradientStop Offset="1" Color="#11FFFFFF" />
                </LinearGradientBrush>
              </Grid.Background>
            </Grid>
          </Grid>
          <Button 
            Background="LightGray"
            Click="OnCloseButtonClick"
            Content="X"
            HorizontalAlignment="Right"
            Focusable="False"
            FontFamily="Courier" 
            FontSize="11"
            FontWeight="Bold"  
            Margin="0,0,4,0"
            Padding="0"
            ToolTip="Close"
            VerticalAlignment="Center"
            VerticalContentAlignment="Bottom"
            Width="16" Height="16" 
            />
          <Button 
            Background="LightGray"
            Click="OnMinimizeButtonClick"
            HorizontalAlignment="Right"
            Focusable="False"
            Margin="0,0,22,0"
            Padding="0"
            ToolTip="Minimize"
            VerticalAlignment="Center"
            Width="16" Height="16" 
            >
            <Line Stroke="Black" StrokeThickness="2" X1="0" X2="8" Y1="9" Y2="9" SnapsToDevicePixels="True" />
          </Button>
        </Grid>
        <DockPanel HorizontalAlignment="Stretch" Margin="8,6,8,2">
          <Button 
            Click="OnRefreshButtonClick" 
            DockPanel.Dock="Right" 
            Style="{StaticResource RefreshButtonStyle}"
            TabIndex="1"
            />
          <ComboBox 
            x:Name="windowsCombo" 
            Background="WhiteSmoke"
            HorizontalAlignment="Stretch"
            IsSynchronizedWithCurrentItem="True"  
            Margin="8,4" 
            VerticalAlignment="Center" 
            TabIndex="0"
            />
        </DockPanel>
      </StackPanel>

      <local:AlienDudeControl 
        x:FieldModifier="private"
        x:Name="alienDude"
        HorizontalAlignment="Left" 
        VerticalAlignment="Top" 
        Margin="-10,-12,0,0"
        />

      <Button 
        x:FieldModifier="private"
        x:Name="crackItButton" 
        Background="LightGray" 
        Click="OnCrackItButtonClick" 
        Content="Crack it"
        HorizontalAlignment="Center" 
        Margin="12,4" 
        TabIndex="2" 
        VerticalAlignment="Bottom"
        Width="120"
        />
    </Grid>
  </Border>
</Window>